package design.onekey.controller;

import design.onekey.base.BaseEntity;
import design.onekey.constant.enums.MsgLevelEnum;
import design.onekey.base.Response;
import design.onekey.constant.StatusCode;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: AuthController
 * @Description: shiro权限用controller
 * @author blcloak
 * @date 2020-06-12 09:28:24
*/
@RestController
@RequestMapping("/api")
public class AuthController{

	@RequestMapping(value = "/unnauthorized",method = RequestMethod.GET)
	public Response unauthorized() {
		BaseEntity result = new BaseEntity();
		result.setStatusCode(StatusCode.AUTH_FAILURE);
		result.setStatusMsg("未授权");
		result.setMsgLevel(MsgLevelEnum.ERROR.getCode());
		return Response.success(result);
	}
}
